﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LunarSF.SHomeWorkshop.LunarMarkdownEditor.PythonAnalysis
{

    /// <summary>
    /// Python 文件中某些元素的类型。
    /// </summary>
    public enum PythonElementType
    {
        /// <summary>
        /// imported python model
        /// </summary>
        ImportedModel,
        /// <summary>
        /// imported .net .dll(or .exe) file
        /// </summary>
        ImportedDotNetLib,
        /// <summary>
        /// imported .net class
        /// </summary>
        ImportedDotNetClass,
        /// <summary>
        /// imported .net or python alias(another name)
        /// </summary>
        Alias,
        /// <summary>
        /// python global variable
        /// </summary>
        Var,
        /// <summary>
        /// python method
        /// </summary>
        Method,
        /// <summary>
        /// python method argument
        /// </summary>
        Arg,
        /// <summary>
        /// python class
        /// </summary>
        Class,
    }

    public class PythonElementInfo
    {
        public PythonElementType ElementType { get; set; } = PythonElementType.Var;
        public string ElementName { get; set; } = "";
        /// <summary>
        /// 仅当 MemberType 为 Class 时，才有必要给它添加子元素。
        /// </summary>
        public List<PythonElementInfo> SubElements = new List<PythonElementInfo>();
    }
}
